package cn.ly817.jay.DTO;

/**
 * 封装json返回结果
 * Created by LuoYu on 2016/11/21.
 */
public class JSONResult<T> {
    private boolean success;

    private T data;
    //方便浏览器console调试
    private String error;



    public JSONResult(boolean success, String error) {
        this.success = success;
        this.error = error;
    }

    public JSONResult(boolean success, T data) {

        this.success = success;
        this.data = data;
    }

    public JSONResult(boolean success, T data, String error) {
        this.success = success;
        this.data = data;
        this.error = error;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }


}
